const { Schema, SchemaTypes } = require('../schema');
class AreaExtension extends Schema {
    PropertyModelDataTemplate () {
        return {
            areaId: {
                type: SchemaTypes.ObjectId,
                required: true
            },
            popupAd: {
                type: SchemaTypes.String,
                required: false
            },
            popupLink: {
                type: SchemaTypes.String,
                required: false
            },
            // 活动秒杀封面（废弃)
            coverLink: {
                type: SchemaTypes.String,
                required: false
            },
            // 活动秒杀banner(废弃)
            activityBanner: {
                type: SchemaTypes.Array,
                required: false,
                default: []
            },
            // 活动结束时间
            activeEndTime: {
                type: SchemaTypes.Number,
                required: false
            },
            // 首页轮播（废弃）
            banner: {
                type: SchemaTypes.Array,
                required: true,
                default: []
            },
            noticeBar: {
                type: SchemaTypes.String,
                required: false,
                comment: '首页滚动文章',
                default: ''
            },
            createTime: {
                type: SchemaTypes.Number,
                required: true,
                default: require('../../module/tool/time').getCurrentTimestamp()
            }
        };
    }
}

module.exports = AreaExtension;
